\(\int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx\) [2403]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 34 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {3-4 x+x^2}-\text {arctanh}\left (\frac {2-x}{\sqrt {3-4 x+x^2}}\right ) \]

[Out]

-arctanh((2-x)/(x^2-4*x+3)^(1/2))+(x^2-4*x+3)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {654, 635, 212} \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {x^2-4 x+3}-\text {arctanh}\left (\frac {2-x}{\sqrt {x^2-4 x+3}}\right ) \]

[In]

Int[(-1 + x)/Sqrt[3 - 4*x + x^2],x]

[Out]

Sqrt[3 - 4*x + x^2] - ArcTanh[(2 - x)/Sqrt[3 - 4*x + x^2]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 635

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \sqrt {3-4 x+x^2}+\int \frac {1}{\sqrt {3-4 x+x^2}} \, dx \\ & = \sqrt {3-4 x+x^2}+2 \text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {-4+2 x}{\sqrt {3-4 x+x^2}}\right ) \\ & = \sqrt {3-4 x+x^2}-\tanh ^{-1}\left (\frac {2-x}{\sqrt {3-4 x+x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {3-4 x+x^2}+2 \text {arctanh}\left (\frac {\sqrt {3-4 x+x^2}}{-3+x}\right ) \]

[In]

Integrate[(-1 + x)/Sqrt[3 - 4*x + x^2],x]

[Out]

Sqrt[3 - 4*x + x^2] + 2*ArcTanh[Sqrt[3 - 4*x + x^2]/(-3 + x)]

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76

method result size
default \(\ln \left (-2+x +\sqrt {x^{2}-4 x +3}\right )+\sqrt {x^{2}-4 x +3}\) \(26\)
trager \(\ln \left (-2+x +\sqrt {x^{2}-4 x +3}\right )+\sqrt {x^{2}-4 x +3}\) \(26\)
risch \(\ln \left (-2+x +\sqrt {x^{2}-4 x +3}\right )+\sqrt {x^{2}-4 x +3}\) \(26\)

[In]

int((-1+x)/(x^2-4*x+3)^(1/2),x,method=_RETURNVERBOSE)

[Out]

ln(-2+x+(x^2-4*x+3)^(1/2))+(x^2-4*x+3)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.85 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {x^{2} - 4 \, x + 3} - \log \left (-x + \sqrt {x^{2} - 4 \, x + 3} + 2\right ) \]

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="fricas")

[Out]

sqrt(x^2 - 4*x + 3) - log(-x + sqrt(x^2 - 4*x + 3) + 2)

Sympy [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.91 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {x^{2} - 4 x + 3} + \log {\left (2 x + 2 \sqrt {x^{2} - 4 x + 3} - 4 \right )} \]

[In]

integrate((-1+x)/(x**2-4*x+3)**(1/2),x)

[Out]

sqrt(x**2 - 4*x + 3) + log(2*x + 2*sqrt(x**2 - 4*x + 3) - 4)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.85 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {x^{2} - 4 \, x + 3} + \log \left (2 \, x + 2 \, \sqrt {x^{2} - 4 \, x + 3} - 4\right ) \]

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="maxima")

[Out]

sqrt(x^2 - 4*x + 3) + log(2*x + 2*sqrt(x^2 - 4*x + 3) - 4)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\sqrt {x^{2} - 4 \, x + 3} - \log \left ({\left | -x + \sqrt {x^{2} - 4 \, x + 3} + 2 \right |}\right ) \]

[In]

integrate((-1+x)/(x^2-4*x+3)^(1/2),x, algorithm="giac")

[Out]

sqrt(x^2 - 4*x + 3) - log(abs(-x + sqrt(x^2 - 4*x + 3) + 2))

Mupad [B] (verification not implemented)

Time = 10.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.74 \[ \int \frac {-1+x}{\sqrt {3-4 x+x^2}} \, dx=\ln \left (x+\sqrt {x^2-4\,x+3}-2\right )+\sqrt {x^2-4\,x+3} \]

[In]

int((x - 1)/(x^2 - 4*x + 3)^(1/2),x)

[Out]

log(x + (x^2 - 4*x + 3)^(1/2) - 2) + (x^2 - 4*x + 3)^(1/2)